 /*	
 *				
 *					ISNW ---- It is a war.It is not warcraft!
 *
 *
 *					Author:					zhoukeli(haxixi_keli)
 *					Filename:				IMeshLoader.h
 *					CreateTime:				2008/12/14
 *					ModifyTime:				2008/12/14
 *					ModifyTime:				2008/12/21
 *
 */

#ifndef __ISNW_I_MESHLOADER_H__
#define __ISNW_I_MESHLOADER_H__

#include "isnwTypes.h"
#include "IReferenceCounted.h"
#include "isnwString.h"
#include "IReadFile.h"
#include "IAnimateMesh.h"

namespace ISNW
{
namespace scene
{
	class IMeshLoader : public IReferenceCounted
	{
	public:
		//! destructor
		virtual ~IMeshLoader(){}

		//! function
		virtual bool isLoaderableFile(const c8* filename) const = 0;

		virtual IAnimateMesh* createmesh(io::IReadFile* readfile) = 0;
	};

	inline bool isspace(u8 ch)
	{
		return (ch == 0x20 || (ch >= 0x09 && ch <= 0x0d));
	}

	inline bool isalpha(u8 ch)
	{
		return (ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A);
	}

	inline bool isnum(u8 ch)
	{
		return (ch >= 0x30 && ch <= 0x39);
	}

	inline bool isalnum(u8 ch)
	{
		return isalpha(ch) || isnum(ch);
	}
} // end namespace scene
} // end namespace ISNW
#endif